package com.study.springboot.mybatisplugin;

import com.study.springboot.mybatisplugin.dao.CategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryMapper categoryMapper;

    @Override
    public List<Category> findAllStudent() {
        return null;
    }

    @Override
    public List<Category> findSomeColumn() {
        return null;
    }

    @Override
    public void deleteById(Integer id) {

    }

    @Override
    public Category findById(Integer id) {
        return categoryMapper.findById(id);
    }

    @Override
    public void updateByPrimarKeySelective(Category student) {

    }
    @Override
    public void update(Category category) {
        categoryMapper.updateCategory(category);
    }

    @Override
    public void saveCategory(Category student) {
        System.out.println("==============");
        categoryMapper.saveCategory(student);
    }

    @Override
    public List<Category> findAllCategory() {
        return categoryMapper.findAllCategory();
    }
//    @Override
//    public List<Category> findAllCategory2() {
//        return categoryMapper.findAllCategory2();
//    }
}
